﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
using Public;


namespace WebsiteAdmin.Salomon.News
{
    public partial class NewsEdit : System.Web.UI.Page
    {
        public int pkid;
        public string newsTitle;
        public string newsContent;
        public string description;
        public string keywords;
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                pkid = Convert.ToInt32(Request["pkid"], CultureInfo.InvariantCulture);
                DataTable dtNews = Bll.News.Single(Global.ConSalomon, pkid);
                if (dtNews.Rows.Count == 1)
                {
                    newsTitle = dtNews.Rows[0]["NewsTitle"].ToString();
                    newsContent = dtNews.Rows[0]["NewsContent"].ToString();
                    description = dtNews.Rows[0]["Description"].ToString();
                    keywords = dtNews.Rows[0]["Keywords"].ToString();

                }
                dtNews.Dispose();
            }
        }
    }
}
